//package com.nice.controller;
//
//import java.io.File;
//import java.util.List;
//
//import org.fusesource.leveldbjni.JniDBFactory;
//import org.iq80.leveldb.DB;
//import org.iq80.leveldb.Options;
//import org.iq80.leveldb.WriteBatch;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import com.nice.message.Message;
//
//public class LVDBDao implements MessageDao {
//
//	private DB db;
//	private File dbTmpFile;
//	private long keyCounter;
//	private WriteBatch batch;
//	private Options dbOptions;
//	private static final int BATCH_SIZE = 1000;
//	private static final int CACHE_SIZE = 100 * 1024 * 1024;
//	private static Logger logger = LoggerFactory.getLogger(LVDBDao.class);
//
//	@Override
//	public boolean save(Message msg) {
//		
//		return false;
//	}
//
//	@Override
//	public List<Message> query(int clientId) {
//		return null;
//	}
//
//	@Override
//	public boolean delete(List<Message> msgs) {
//		return false;
//	}
//
//	private void createLVDB() {
//		try {
//			dbOptions = new Options();
//			dbOptions.cacheSize(CACHE_SIZE);
//			dbOptions.createIfMissing(true);
//			long now = System.currentTimeMillis();
//			dbTmpFile = new File(String.valueOf(now));
//			db = JniDBFactory.factory.open(dbTmpFile, dbOptions);
//			batch = db.createWriteBatch();
//		} catch (Exception e) {
//			logger.error("LDBCacheServer init erro", e);
//		}
//
//	}
//}
